﻿using Microsoft.EntityFrameworkCore;
using MockSchoolManagement.Models;
using MockSchoolManagement.Models.EnumTypes;

namespace MockSchoolManagement.Infrastructure
{
    public static class ModelBuilderExtensions
    {
        public static void Seed(this ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Student>().HasData(
                new Student()
                {
                    Id = 1,
                    Name = "李某某",
                    Major = MajorEnum.ElectronicCommerce,
                    Email = "llm@163.com"
                });

            modelBuilder.Entity<Student>().HasData(
                new Student()
                {
                    Id = 2,
                    Name = "李四",
                    Major = MajorEnum.ComputerScience,
                    Email = "lisi@52abp.com"
                });
        }
    }
}